<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.controller');

class SetControllerArea extends JController
{
	function __construct(){
	    parent::__construct();
	}
	function display(){
		$model	= &$this->getModel( 'area' );
		$view	= &$this->getView( 'area','html');
		$view->setModel( $model, true );
		$view->display();
	}
	function getchild(){
		$id = JRequest::getVar('id');
		$model	= &$this->getModel( 'area' );
		$model->area_parent = $id;
		$list = $model->getList();
		echo json_encode($list);
		exit;
	}
}